Skip to content

feat: emit lockup_violation event on transfer revert (Closes #587) - #692

Merged
thlpkee20-wq merged 3 commits into
RevoraOrg:masterfrom
emmyafolly123-coder:feat/lockup-violation-event
Jul 29, 2026
Merged

feat: emit lockup_violation event on transfer revert (Closes #587)#692
thlpkee20-wq merged 3 commits into
RevoraOrg:masterfrom
emmyafolly123-coder:feat/lockup-violation-event

Conversation

@emmyafolly123-coder

Copy link
Copy Markdown
Contributor

Overview

Attempts to transfer locked-up shares now revert cleanly and emit a structured lockup_violation event with the attempted amount, caller address, and current unlock schedule for indexer alerting.

Related Issue

Closes #587

Changes

  • [ADD] EVENT_LOCKUP_VIOLATION constant — topic: lock_viol
  • [ADD] LockupViolation = 63 error variant to RevoraError enum
  • [ADD] Lockup check in transfer_with_attestation: rejects transfer when unlocked_bps < 10,000
  • [ADD] Event emission: (EVENT_LOCKUP_VIOLATION, from) -> (to, amount_bps, schedule) on violation

Security

  • Transfer reverts cleanly with no state mutation on lockup violation
  • Event includes caller address and full schedule for indexer alerting
  • No bypass: check runs on every transfer via transfer_with_attestation
  • Edge cases: transfer at exactly unlock_ts is allowed (unlocked_bps == 10,000)

Verification

cargo test --all
Acceptance Criteria Status
Lockup violation event emitted on revert EVENT_LOCKUP_VIOLATION published
Event includes caller and schedule info (from, to, amount_bps, schedule)
No state change on revert Err returned before any mutation
Transfer at unlock_ts allowed unlocked_bps == 10,000 passes

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@emmyafolly123-coder Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@thlpkee20-wq
thlpkee20-wq merged commit 9d3bf19 into RevoraOrg:master Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add lockup-violation event and revert path when transfer during lockup is attempted

2 participants